{% extends 'base.html' %}

{% load staticfiles %}

{% block title %}授课教师{% endblock %}
{% block crumbs%}
<!--crumbs start-->
<section>
    <div class="wp">
        <ul  class="crumbs">
            <li><a href="{% url 'index' %}">首页</a>></li>
            <li>授课教师</li>
        </ul>
    </div>
</section>
 {% endblock %}
{% block body %}
<section>
	<div class="wp butler_list_box list">
	<div class='left'>
		<div class="butler_list layout">
			<div class="head">
				<ul class="fl tab_header">
					<li class="{% ifequal sort '' %}active{% endifequal %}"><a href="?sort=">全部</a> </li>
					<li class="{% ifequal sort 'hot' %}active{% endifequal %}"><a href="?sort=hot">人气 &#8595;</a></li>
				</ul>
                <div class="fr butler-num">共<span class="key">{{ te_nums }}</span>人&nbsp;&nbsp;&nbsp;</div>
			</div>
                {% for teacher in teachers.object_list %}
                <dl class="des">
					<dt>
						<a href="{% url 'org:teacher_detail' teacher.id %}">
                            <div class="picpic">
                                <img width="100" height="100" class="scrollLoading" src="{{ MEDIA_URL }}{{ teacher.image }}" title="加载中"/>
                            </div>
                        </a>
						<div class="btn">
							<div class="fr btn2 bdsharebuttonbox"
                                 data-text="授课教师-{{ teacher.name }}-在线学习网"
                                 data-desc="我在#在线学习网#发现了教师“{{ teacher.name }}”，对学习中的小伙伴很有帮助，一起来看看吧。"
                                 data-comment="{% if teacher.is_gold %}{{ teacher.name }}金牌教师，{% endif %}从业年限：{{ teacher.work_years }}年"
                                 >
                                <span class="fl">分享</span>
                                <a href="#" class="bds_more" data-cmd="more"></a>
                            </div>
						</div>
					</dt>
					<dd>
						<a href="{% url 'org:teacher_detail' teacher.id %}">
                            <h1>{{ teacher.name }}
                                {% if teacher.is_gold and teacher.is_authentication %}
                                    <span class="key picbig">金牌教师</span>
                                    {% elif teacher.is_authentication %}
                                    &ensp;&ensp;<img src="{% static 'images/authentication.png' %}"/>
                                {% endif %}
                            </h1>
                        </a>
						<ul class="cont">
							<li>工作年限：<span>{{ teacher.work_years }}</span></li>
							<li>工作职位：<span>{{ teacher.work_position }}</span></li>
							<li>就职单位：<span>{{ teacher.org.name }}&nbsp;</span></li>
							<li>年龄：<span>{{ teacher.age }}</span></li>
							<li>教学特点：<span>{{ teacher.teach_points }}</span></li>
						</ul>
					</dd>
                    <a class="buy buyservice" href="{% url 'org:teacher_detail' teacher.id %}">
                        <br/>查看<br/>详情</a>
                </dl>
                {% endfor %}
		</div>
{#分页功能#}
		 <div class="pageturn">
             <ul class="pagelist">
                 <li class="long">
                    {% if teachers.has_previous %}
                    <a href="?{{ teachers.previous_page_number.querystring }}" class="prev">上一页</a>
                    {% endif %}
                 </li>

                 {% for page in teachers.pages %}
                    {% if page %}
                    {% ifequal page teachers.number %}
                 <li class="active"><a href="?{{ page.querystring }}" class="page">{{ page }}</a></li>
                    {% else %}
                 <li><a href="?{{ page.querystring }}" class="page">{{ page }}</a></li>
                    {% endifequal %}
                  {% else %}
                 <li class="none"><a href="">...</a></li>
                  {% endif %}
                 {% endfor %}

                 {% if teachers.has_next %}
                 <li class="long"><a href="?{{ teachers.next_page_number.querystring }}">下一页</a></li>
                 {% endif %}
             </ul>
        </div>
	</div>



	<div class="right layout">
		<div class="head">教师排行榜</div>
            {% for hot_teacher in hot_teachers %}
             <dl class="des">
                <dt class="num fl">{{ forloop.counter }}</dt>
                <a href="{% url 'org:teacher_detail' hot_teacher.id %}">
                    <dt>
                        <img width="50" height="50" class="scrollLoading"  src="{{ MEDIA_URL }}{{ hot_teacher.image }}" title="加载中"/>
                    </dt>
                </a>
                <dd>
                    <a href="{% url 'org:teacher_detail' hot_teacher.id %}">
                        <h1 title="{{ hot_teacher.name }}">{{ hot_teacher.name }}</h1>
                    </a>
                    <p>工作年限：<span>{{ hot_teacher.work_years }}</span></p>
                </dd>
            </dl>
            {% endfor %}




	</div>
    </div>
</section>
{% endblock %}

